#!/bin/bash

# Source ROS setup script
source /opt/ros/noetic/setup.zsh

# Specify the topics you want to record
TOPICS="/IMU_data /euler/IMU_data /euler/vicon /euler/mavros /mavros/vision_pose/pose /mavros/vision_pose/odom /mavros/local_position/pose /uav201/mocap/pos /uav201/mocap/vel /IMU_data /Odometry"

# Set the output bag file name to the current date and time (精确到分钟)
OUTPUT_BAG_FILE=$(date +"/home/uav201/cius_ws/fastlio_ws/src/bagfiles/ros.bag")

# Your rosbag record command here
rosbag record $TOPICS -o $OUTPUT_BAG_FILE

